Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Tools & Utilities

Reply
 
LinkBack Thread Tools Display Modes
Old 04-03-2009, 10:32 AM   #1 (permalink)
Registered Member
 
Join Date: Apr 2009
Posts: 96
Austin is on a distinguished road
Question Quick question

Alright so im making a math game app where a math problem is displayed and the user must answer it. When they get it correct I want a string of text displayed. Here is my code...

if (amount = [number1.text intValue] * [number2.text intValue] = [newAmount.text intValue]);
answer.text = @"Correct";
;

Someone help me out. Thanks!
Austin is offline   Reply With Quote
Old 04-03-2009, 10:38 AM   #2 (permalink)
Pro. Game Developer
iPhone Dev SDK Supporter
 
Join Date: Feb 2009
Location: żLa Islas Hermosas?
Posts: 2,176
Kalimba is on a distinguished road
Default

Quote:
Originally Posted by Austin View Post
Alright so im making a math game app where a math problem is displayed and the user must answer it. When they get it correct I want a string of text displayed. Here is my code...

if (amount = [number1.text intValue] * [number2.text intValue] = [newAmount.text intValue]);
answer.text = @"Correct";
;

Someone help me out. Thanks!
There is a critical difference between the "=" operator and the "==" operator.

Also, I don't think the "iPhone SDK Tools & Utilities" category is the correct location for this post.
Kalimba is offline   Reply With Quote
Old 04-03-2009, 12:06 PM   #3 (permalink)
Former NeXTStep Developer
 
Join Date: Mar 2009
Posts: 997
FlyingDiver will become famous soon enough
Default

You probably also need at least one set of parenthesis in there.

joe
FlyingDiver is offline   Reply With Quote
Reply

Bookmarks

Tags
app, math, question

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 380
9 members and 371 guests
apatsufas, comicool, dansparrow, husthlj, LunarMoon, mer10, Murphy, padsoftware, pbart
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,677
Threads: 94,127
Posts: 402,916
Top Poster: BrianSlick (7,990)
Welcome to our newest member, husthlj
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:07 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0